package com.iss.springdemo1.ioc;

public class BeanFactory {

    /*
      *  <bean>
      *      <bean-name>empService</bean-name>
      *      <bean-class>com.iss.ioc.empService</bean-name>
      *  </bean>
      *
      *  <bean-mapping>
      *      <bean-name>empService</bean-name>
      *       <bean-instance>com.iss.ioc.empServiceImpl</bean-instance>
      *  </bean-mapping>
      *
    * */

    /*
     *  查找配置文件，bean的相关实现类，new一个实例返回给调用者
    * */

    public Object getBean(Class cls){
          Object innerClass = null;

        try {
            innerClass= cls.newInstance();
        } catch (InstantiationException e) {
            e.printStackTrace();
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        }

        return innerClass;
    }


    public Object getBean(String classPath){

        Object innerClass=null;




        return  innerClass;
    }
}
